//
// Created by yan on 7/7/17.
//

#include "daqsys/BaseDaq.h"

BaseDaq::BaseDaq(std::string name) : bSysNode(name) {


}

int BaseDaq::addDaqDevice(std::string dev) {
    daqDev = (bDaqMod *)getIstance(dev);
    if(daqDev == NULL)
        return -1;
    if(daqDev->setMode(getIstance("daqcfg")))
        return -1;

    return 0;
}

ssize_t BaseDaq::sendData(void *buf, size_t count) {

    return daqDev->sendData(buf,count);
}

ssize_t BaseDaq::recvData(void *buf, size_t count) {
    return daqDev->recvData(buf,count);
}
